package com.jam.cloud.es.pojo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
public class HotelDoc implements Serializable {

    @TableId(type = IdType.INPUT)
    private Long id;
    private String name;
    private String address;
    private Integer price;
    private Integer score;
    private String brand;
    private String city;
    private String starName;
    private String business;
//    private String longitude;
//    private String latitude;
    private String location;
    private String pic;


    public HotelDoc(Hotel hotel){
        this.id = hotel.getId();
        this.name = hotel.getName();
        this.address = hotel.getAddress();
        this.price = hotel.getPrice();
        this.score = hotel.getScore();
        this.brand = hotel.getBrand();
        this.city = hotel.getCity();
        this.starName = hotel.getStarName();
        this.business  = hotel.getBusiness();
        this.location =  hotel.getLatitude()  + "," + hotel.getLongitude(); //geo_point 的格式 ：纬度,经度   不能反了
        this.pic = hotel.getPic();
    }

}
